import 'package:flutter/material.dart';

class InLineSpanPage extends StatefulWidget {
  @override
  _InLineSpanPageState createState() => _InLineSpanPageState();
}

class _InLineSpanPageState extends State<InLineSpanPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Text.rich(
        TextSpan(
          text: 'My name is ',
          style: TextStyle(color: Colors.black),
          children: <InlineSpan>[
            WidgetSpan(
                alignment: PlaceholderAlignment.baseline,
                baseline: TextBaseline.alphabetic,
                child: ConstrainedBox(
                  constraints: BoxConstraints(maxWidth: 100),
                  child: TextField(),
                )),
            TextSpan(
              text: '.',
            ),
          ],
        ),
      ),
    );
  }
}
